<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module ra_snapshot</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
<body bgcolor="white">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<hr>

<h1>Module ra_snapshot</h1>
<ul class="index"><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>


<h2><a name="types">Data Types</a></h2>

<h3 class="typedecl"><a name="type-effect">effect()</a></h3>
<p><pre>effect() = {monitor, process, snapshot_writer, pid()}</pre></p>


<h3 class="typedecl"><a name="type-file_err">file_err()</a></h3>
<p><pre>file_err() = <a href="file.html#type-posix">file:posix()</a> | badarg | terminated | system_limit</pre></p>


<h3 class="typedecl"><a name="type-meta">meta()</a></h3>
<p><pre>meta() = <a href="#type-snapshot_meta">snapshot_meta()</a></pre></p>


<h3 class="typedecl"><a name="type-state">state()</a></h3>
<p><b>abstract datatype</b>: <tt>state()</tt></p>


<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#init-3">init/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#init_ets-0">init_ets/0</a></td><td></td></tr>
<tr><td valign="top"><a href="#current-1">current/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#pending-1">pending/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#accepting-1">accepting/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#directory-1">directory/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#last_index_for-1">last_index_for/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#begin_snapshot-3">begin_snapshot/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#complete_snapshot-2">complete_snapshot/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#begin_accept-2">begin_accept/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#accept_chunk-4">accept_chunk/4</a></td><td></td></tr>
<tr><td valign="top"><a href="#abort_accept-1">abort_accept/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#handle_down-3">handle_down/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#delete-2">delete/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#begin_read-1">begin_read/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#read_chunk-3">read_chunk/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#recover-1">recover/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#read_meta-2">read_meta/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#current_snapshot_dir-1">current_snapshot_dir/1</a></td><td></td></tr>
</table>

<h2><a name="functions">Function Details</a></h2>

<h3 class="function"><a name="init-3">init/3</a></h3>
<div class="spec">
<p><pre>init(UId :: <a href="#type-ra_uid">ra_uid()</a>,
     Module :: module(),
     SnapshotsDir :: <a href="file.html#type-filename">file:filename()</a>) -&gt;
        <a href="#type-state">state()</a></pre></p>
</div>

<h3 class="function"><a name="init_ets-0">init_ets/0</a></h3>
<div class="spec">
<p><pre>init_ets() -&gt; ok</pre></p>
</div>

<h3 class="function"><a name="current-1">current/1</a></h3>
<div class="spec">
<p><pre>current(X1 :: <a href="#type-state">state()</a>) -&gt; <a href="#type-maybe">maybe</a>(<a href="#type-ra_idxterm">ra_idxterm()</a>)</pre></p>
</div>

<h3 class="function"><a name="pending-1">pending/1</a></h3>
<div class="spec">
<p><pre>pending(X1 :: <a href="#type-state">state()</a>) -&gt; <a href="#type-maybe">maybe</a>({pid(), <a href="#type-ra_idxterm">ra_idxterm()</a>})</pre></p>
</div>

<h3 class="function"><a name="accepting-1">accepting/1</a></h3>
<div class="spec">
<p><pre>accepting(X1 :: <a href="#type-state">state()</a>) -&gt; <a href="#type-maybe">maybe</a>(<a href="#type-ra_idxterm">ra_idxterm()</a>)</pre></p>
</div>

<h3 class="function"><a name="directory-1">directory/1</a></h3>
<div class="spec">
<p><pre>directory(X1 :: <a href="#type-state">state()</a>) -&gt; <a href="file.html#type-filename">file:filename()</a></pre></p>
</div>

<h3 class="function"><a name="last_index_for-1">last_index_for/1</a></h3>
<div class="spec">
<p><pre>last_index_for(UId :: <a href="#type-ra_uid">ra_uid()</a>) -&gt; <a href="#type-maybe">maybe</a>(<a href="#type-ra_index">ra_index()</a>)</pre></p>
</div>

<h3 class="function"><a name="begin_snapshot-3">begin_snapshot/3</a></h3>
<div class="spec">
<p><pre>begin_snapshot(Meta :: <a href="#type-meta">meta()</a>,
               ReleaseCursorRef :: term(),
               State :: <a href="#type-state">state()</a>) -&gt;
                  {<a href="#type-state">state()</a>, [<a href="#type-effect">effect()</a>]}</pre></p>
</div>

<h3 class="function"><a name="complete_snapshot-2">complete_snapshot/2</a></h3>
<div class="spec">
<p><pre>complete_snapshot(IdxTerm :: <a href="#type-ra_idxterm">ra_idxterm()</a>, State :: <a href="#type-state">state()</a>) -&gt;
                     <a href="#type-state">state()</a></pre></p>
</div>

<h3 class="function"><a name="begin_accept-2">begin_accept/2</a></h3>
<div class="spec">
<p><pre>begin_accept(Meta :: <a href="#type-meta">meta()</a>, State :: <a href="#type-state">state()</a>) -&gt; {ok, <a href="#type-state">state()</a>}</pre></p>
</div>

<h3 class="function"><a name="accept_chunk-4">accept_chunk/4</a></h3>
<div class="spec">
<p><pre>accept_chunk(Chunk :: term(),
             Num :: non_neg_integer(),
             ChunkFlag :: <a href="#type-chunk_flag">chunk_flag()</a>,
             State :: <a href="#type-state">state()</a>) -&gt;
                {ok, <a href="#type-state">state()</a>}</pre></p>
</div>

<h3 class="function"><a name="abort_accept-1">abort_accept/1</a></h3>
<div class="spec">
<p><pre>abort_accept(State :: <a href="#type-state">state()</a>) -&gt; <a href="#type-state">state()</a></pre></p>
</div>

<h3 class="function"><a name="handle_down-3">handle_down/3</a></h3>
<div class="spec">
<p><pre>handle_down(Pid :: pid(), Info :: term(), State :: <a href="#type-state">state()</a>) -&gt;
               <a href="#type-state">state()</a></pre></p>
</div>

<h3 class="function"><a name="delete-2">delete/2</a></h3>
<div class="spec">
<p><tt>delete(Dir, X2) -&gt; any()</tt></p>
</div>

<h3 class="function"><a name="begin_read-1">begin_read/1</a></h3>
<div class="spec">
<p><pre>begin_read(State :: <a href="#type-state">state()</a>) -&gt;
              {ok, Meta :: <a href="#type-meta">meta()</a>, ReadState} | {error, term()}</pre>
<ul class="definitions"><li><pre>ReadState = term()</pre></li></ul></p>
</div>

<h3 class="function"><a name="read_chunk-3">read_chunk/3</a></h3>
<div class="spec">
<p><pre>read_chunk(ReadState,
           ChunkSizeBytes :: non_neg_integer(),
           State :: <a href="#type-state">state()</a>) -&gt;
              {ok, Data :: term(), {next, ReadState} | last} |
              {error, term()}</pre>
<ul class="definitions"><li><pre>ReadState = term()</pre></li></ul></p>
</div>

<h3 class="function"><a name="recover-1">recover/1</a></h3>
<div class="spec">
<p><pre>recover(X1 :: <a href="#type-state">state()</a>) -&gt;
           {ok, Meta :: <a href="#type-meta">meta()</a>, State :: term()} |
           {error, no_current_snapshot} |
           {error, term()}</pre></p>
</div>

<h3 class="function"><a name="read_meta-2">read_meta/2</a></h3>
<div class="spec">
<p><pre>read_meta(Module :: module(), Location :: <a href="file.html#type-filename">file:filename()</a>) -&gt;
             {ok, <a href="#type-meta">meta()</a>} |
             {error,
              invalid_format |
              {invalid_version, integer()} |
              checksum_error |
              <a href="#type-file_err">file_err()</a> |
              term()}</pre></p>
</div>

<h3 class="function"><a name="current_snapshot_dir-1">current_snapshot_dir/1</a></h3>
<div class="spec">
<p><pre>current_snapshot_dir(X1 :: <a href="#type-state">state()</a>) -&gt; <a href="#type-maybe">maybe</a>(<a href="file.html#type-filename">file:filename()</a>)</pre></p>
</div>
<hr>

<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc</i></p>
</body>
</html>
